package src.model.entity;

import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.OneToMany;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

@Entity
@Table(name = "SALOON", schema = "HB")
@SequenceGenerator(name = "SEQ_GEN", sequenceName = "SAL_SEQ", initialValue = 1, allocationSize = 1)
public class Saloons extends abstractEntity{
	
	private int koltukSayisi;
	private String saloonName;
	private Set<Movies> moviess;
	
	@Column(name="KOLTUK_ADET",nullable=false)
	public int getKoltukSayisi() {
		return koltukSayisi;
	}

	public void setKoltukSayisi(int koltukSayisi) {
		this.koltukSayisi = koltukSayisi;
	}
	@Column(name="SALOON_NAME",nullable=false)
	public String getSaloonName() {
		return saloonName;
	}

	public void setSaloonName(String saloonName) {
		this.saloonName = saloonName;
	}
	
	@OneToMany(mappedBy="saloons")
	public Set<Movies> getMoviess() {
		return moviess;
	}

	public void setMoviess(Set<Movies> moviess) {
		this.moviess = moviess;
	}

	@Override
	public String toString() {
		return "Saloons [koltukSayisi=" + koltukSayisi + ", saloonName="
				+ saloonName + "]";
	}
	
	
	
}
